home *** CD-ROM | disk | FTP | other *** search
- /***********************************************************************************
- CExpander.h
-
- Copyright © 1994 B-Ray Software. All rights reserved.
- Developed using Symantec C++ 7.0.2 and Symantec's TCL library.
- Portions of this code courtesy Symantec, Inc.
-
- This code may be freely distributed as long as this notice remains. This code
- may not be used in any commercial software without the consent of B-Ray Software.
-
- ---
-
- Header for CExpander class.
-
- ***********************************************************************************/
- #pragma once
-
-
- #include <CStream.h>
-
- #include "CExpanderPane.h"
- #include "CExpanderLabel.h"
- #include "CExpanderButton.h"
-
-
- class CExpander : public CExpanderPane {
-
- TCL_DECLARE_CLASS
-
- private:
- Boolean isExpanded;
- Boolean savedExpanderFlag;
-
- protected:
- static short const kExpanderButtonSize;
- CExpanderLabel *itsLabel;
- CExpanderButton *itsButton;
-
- virtual void MakeExpanderButton( void );
- virtual void MakeExpanderLabel( void );
-
- virtual void ChangeSelf( long changedIndex, Rect *delta );
- virtual void ValidateHeader( void );
- virtual void SetMinimizedSize( void );
- virtual void SetExpandedSize( void );
-
- virtual void ParentMessage( long message, void *param );
-
- public:
- CExpander();
- CExpander( CView *anEnclosure, CBureaucrat *aSupervisor,
- short aWidth = 0, short aHeight = 0, short aHLoc = 0, short aVLoc = 0,
- SizingOption aHSizing = sizFIXEDSTICKY, SizingOption aVSizing = sizFIXEDSTICKY );
- virtual ~CExpander();
-
- virtual void IExpander( void );
-
- virtual void SetExpandedState( Boolean fExpanded );
- virtual Boolean IsExpanded( void ) { return isExpanded; };
-
- virtual void SetLabelTextRsrcID( short rsrcID ) { itsLabel->SetLabelTextRsrcID( rsrcID ); };
-
- virtual void SetLabelSelectable( Boolean aFlag ) { itsLabel->SetCanSelect( aFlag ); };
-
- virtual void SetDblClickCmd( long theCommand ) { itsLabel->SetDblClickCmd( theCommand ); };
-
- virtual void DoCommand( long theCommand );
-
- virtual void DoKeyDown( char theChar, Byte keyCode, EventRecord *macEvent );
-
- virtual void PutTo( CStream &stream );
- virtual void GetFrom( CStream &stream );
- };
-